<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <!--{include file='comm/header.tpl'}-->
    <title>账户日志列表</title>
    <!--{include file='comm/comm_cal.tpl'}-->
</head>
<body>

<!--{include file='comm/naviBanner.tpl'}-->

<div class="container">

    <!--{include file='comm/menu.tpl'}-->
    <div class="comm_crub">
        <span class="now_crub">账户日志列表</span>
    </div>

    <div class="comm_content">

            <div class="search-box">
                <div style="position:relative">
                    <form id="search_form" onsubmit="return false;">
                        <table>
                            <tbody>
                            <tr>
                                <td>
                                    <span>客户号：<input type="text" size="15" id="pcustID" name="pcustID" value="" /></span>
                                    <span>
                                        账户类型：<select id="account_type" name="account_type">
                                            <option value="2">余额</option>
                                            <option value="3">积分</option>
                                        </select>
                                    </span>
                                    <span>
                                        类型：<select style="width:100px" id="changeType" name="changeType">
                                            <option value="">全部</option>
                                            <option value="1">充值</option>
                                            <option value="2">消费</option>
                                        </select>
                                    </span>
                                    <span>
                                        日期：<input autocomplete="off" id="startDate" name="startDate" readonly="" value="" style="width:100px" type="text">
                                        ～
                                        <input autocomplete="off" id="endDate" name="endDate" readonly="" value="" style="width:100px" type="text">
                                    </span>
                                    <span><input type="button" value="查询" class="btn" onclick="account.search();" /></span>
                                    <span><input type="button" value="重置" class="btn" onclick="account.reset();" /></span>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </form>
                </div>
            </div>

            <table id="flex" style="display:none"></table>

        </div>


</div>

<script type="text/javascript">
    $("#flex").flexigrid({
        url:"/invokingAjax-backend/customer/customer.ajax?operFlg=8",
        dataType: "json",
        colModel : [
            {display: "客户号",align: "center", width : 150},
            {display: "账户名称",align: "center", width : 150},
            {display: "变更金额", width : 130},
            {display: "操作人", width : 130},
            {display: "操作时间",align: "center", name : "createTime", width : 200, sortable : true},
            {display: "备注",align: "center", width : 200},
            {display: "类型",align: "center", width : 120}
        ],
        sortname: "createTime",
        sortorder: "desc",
        usepager: true,
        rp: 10,
        useRp: true,
        showTableToggleBtn: true,
        autoload: false,
        onSubmit: function() {
            var dt = $("#search_form").serializeArray();
            $("#flex1").flexOptions({params: dt});
            return true;
        }
    });

    var account = {

        //搜索账户异动
        search: function() {
            var dt = $('#search_form').serializeArray();
            $("#flex").flexOptions({params: dt}).flexReload();
        },

        //重置
        reset: function() {
            self.location = "/quanliadmin/app/customer/customer.pscript?operFlg=8";
        },

        //重新加载
        load: function() {
            $("#flex").flexReload();
        }

    };

    cal.manageFields("startDate", "startDate", "%Y-%m-%d");
    cal.manageFields("endDate", "endDate", "%Y-%m-%d");

</script>

</body>
</html>